package com.lmy.springboot.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class MonsterController {

    @RequestMapping(value = "/monster", method = RequestMethod.GET)
    public String getMonster() {
        return "GET-查询妖怪";
    }

    @RequestMapping(value = "/monster", method = RequestMethod.POST)
    public String saveMonster() {
        return "SAVE-添加妖怪";
    }

    @RequestMapping(value = "/monster", method = RequestMethod.PUT)
    public String updateMonster() {
        return "PUT-修改妖怪";
    }

    @RequestMapping(value = "/monster", method = RequestMethod.DELETE)
    public String deleteMonster() {
        return "DELETE-删除妖怪";
    }
}
